package com.example.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author: 21050134
 * @date: 2023/10/10 13:33
 * @description:
 */
@Configuration
public class ApplicationContexBean {

	@Bean
	@LoadBalanced //与 Ribbon 集成，并开启负载均衡功能
	public RestTemplate getRestTemplate(){
		return new RestTemplate();
	}
}
